# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=rcs
pkgver=5.9.4
pkgrel=1
pkgdesc='Revision Control System: manages multiple revisions of files'
url='http://www.gnu.org/software/rcs/'
license=('GPL3')
arch=('i686' 'x86_64')
groups=('base-devel')
source=("ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"
        rcs-5.8.1-msys2.patch)
sha1sums=('e87fb2e587fa165204ef69f69b7d5cd354c4e44d'
          '70cbc17ccf1d39ff0dac99959f8d0d8c46b0b306')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i ${srcdir}/rcs-5.8.1-msys2.patch

  autoreconf -fi
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --build=${CHOST} --prefix=/usr
  make
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make prefix="${pkgdir}/usr" install
}
